package design.pattern.application.CommandAndChain;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2020-05-22 14:31:00
 */
public class CommandAndChainTest {

    public static void main(String[] args) throws IOException {
        Invoker invoker = new Invoker();
        while (true){
            System.out.println("#");
            String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
            if(input.equals("quit") || input.equals("exit")){
                return;
            }
            System.out.println(invoker.exec(input));
        }
    }

}
